package com.briup.pts.web.controller;

import com.briup.pts.config.response.Result;
import com.briup.pts.domain.bean.Batch;
import com.briup.pts.service.BatchService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@Tag(name = "批次管理模块")
@RestController
@RequestMapping("/batch")
@RequiredArgsConstructor
public class BatchController {

    private final BatchService service;

    @Operation(summary = "查询所有批次信息下拉列表接口")
    @GetMapping("/queryAll")
    public Result<List<Batch>> queryAll(){
        return Result.success(service.queryAll());
    }
}
